import 'package:buy_flutter/page/login/view/login.dart';
import 'package:buy_flutter/page/login/view/login_sms_code.dart';
import 'package:buy_flutter/page/main/view/main_view.dart';
import 'package:buy_flutter/page/splash/view/welcome_page.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/cupertino.dart';

class RouterHandlers {
  static Handler homeHandler = new Handler(handlerFunc:
      (BuildContext context, Map<String, List<String>> parameters) {
    return MainView();
  });
  static Handler loginHandler = new Handler(handlerFunc:
      (BuildContext context, Map<String, List<String>> parameters) {
    return LoginPage();
  });

  static Handler emptyHandler = new Handler(handlerFunc:
      (BuildContext context, Map<String, List<String>> parameters) {
    return Container();
  });

  static Handler loginSmsCode = new Handler(handlerFunc:
      (BuildContext context, Map<String, List<String>> parameters) {
    String phone = parameters["phone"][0];
    return LoginSmsCodePage(phone,"3");
  });

  static Handler splashHanlder = new Handler(handlerFunc:
      (BuildContext context, Map<String, List<String>> parameters) {
    return WelcomePage();
  });
}
